<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%
	String contextPath = request.getContextPath();
%>
<!DOCTYPE html>
<html>
<head>
<title>首页机构化存储数据导入</title>
<style type="text/css">
#hospInfo {
	width: 550px;
	margin-top: 40px;
	margin-bottom: 40px;
	text-align: center;
	padding: 20px 50px;
	border-radius: 10px;
	border: 1px solid #ddd;
	box-shadow: 0 15px 80px rgba(0, 0, 0, .2);
	background-color: white;
}

.ue-animation, [required="required"] {
	-webkit-backface-visibility: hidden;
	-moz-backface-visibility: hidden;
	-ms-backface-visibility: hidden;
	-o-backface-visibility: hidden;
	backface-visibility: hidden;
	-webkit-animation-duration: .8s;
	-webkit-animation-delay: .2s;
	-webkit-animation-timing-function: ease;
	-webkit-animation-fill-mode: both;
	-moz-animation-duration: .8s;
	-moz-animation-delay: .2s;
	-moz-animation-timing-function: ease;
	-moz-animation-fill-mode: both;
	-ms-animation-duration: .8s;
	-ms-animation-delay: .2s;
	-ms-animation-timing-function: ease;
	-ms-animation-fill-mode: both;
	-o-animation-duration: .8s;
	-o-animation-delay: .2s;
	-o-animation-timing-function: ease;
	-o-animation-fill-mode: both;
	animation-duration: .8s;
	animation-delay: .2s;
	animation-timing-function: ease;
	animation-fill-mode: both
}
#sdate, #edate, #benchmarkYear {
	background-color: white;
}

.version {
	font-size: 10px;
	position: relative;
	top: -20px;
}

canvas {
	position: absolute;
	margin: 0;
}

.under-line-form .form-horizontal input[type="text"], .form-horizontal textarea,
	.form-horizontal textarea:focus {
	border: none;
	box-shadow: none;
	border-bottom: 1px solid #333;
	border-radius: 0;
	font-size: 18px;
	color: #000;
}

label {
	font-weight: normal;
}

.form-level label {
	border: 1px solid #eee;
	padding: 5px;
	text-align: center　 !important;
	border-radius: 5px;
	cursor: pointer;
}

.form-level .control-label {
	text-align: center;
	margin: 2px 0;
}

.form-level input {
	display: none !important;
}

.form-level .select {
	background-color: #5CB85C;
	color: #fff;
}

.formselect {
	height: 30px;
	padding: 5px 10px;
	font-size: 12px;
	line-height: 1.5;
	border-radius: 3px;
}
/*  医院类型 */
.form-level-report-type label {
	border: 1px solid #eee;
	padding: 5px;
	text-align: center　 !important;
	border-radius: 5px;
}

.form-level-report-type {
	text-align: center;
	margin: 2px 0;
}

.form-level-report-type input {
	display: none !important;
}

.form-level-report-type .select {
	background-color: #5CB85C;
}
#hospForm>.row{
	margin-top:5px;
	margin-bottom:5px;
}
</style>
</head>
<body>
	<canvas id="bg_canvas"></canvas>

	<div class="container-fluid">
		<div class="row">
			<div class="col-md-12">
				<div class="row">
					<div class="col-md-12">
						<h2 align="center">首页结构化存储导入</h2>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12">
						<div id="card">
							<div class="center-block under-line-form" id="hospInfo" style="position: relative;">
								<form class="form-horizontal" id="hospForm">
									<!-- <div class="row">
										<label class="col-md-3 control-label ">医疗机构代码：</label> 
										<input type="text" class="col-md-9 form-control" name="hospCode" id="hospCode" required="required">
									</div>
									<div class="row">
										<label class="col-md-3 control-label">首页数据版本：</label>
										<div class="col-md-9 form-level">
											<div class="row">
												<label for="3A" class="col-md-3 control-label" style="margin-left: 0px;">临床</label>
												<input type="radio" class="form-control" name="appCode" id="3A" value="Clinic">
												
												<label for="3B" class="col-md-3 control-label select">编目</label>
												<input type="radio" class="form-control" name="appCode" id="3B" value="Coding" checked="checked">
												
												<label for="2A" class="col-md-3 control-label">HQMS</label>
												<input type="radio" class="form-control" name="appCode" id="2A" value="HQMS">
												
												<label for="2B" class="col-md-3 control-label">卫统</label>
												<input type="radio" class="form-control" name="appCode" id="2B" value="WT4">
											</div>
										</div>
									</div> -->
								</form>
								<div class="row">
									<label class="col-md-3 control-label ">出院日期区间：</label> 
									<input class="col-md-4 form-control" id="sdate">
									<div class="col-md-1" style="padding: 8px 0;">至</div>
									<input class="col-md-4 form-control" id="edate">
								</div>
								<div class="row">
									<button class="col-md-12 btn btn-info" onclick="importData()">开始抽取</button>
								</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- <div id="loading"><i class="icon-spinner icon-spin icon-4x"></i><br><font>正在导入，请稍候...</font></div> -->
	<script type="text/javascript">
	
		$(document).ready(function() {
			$("#" + tabId + " #sdate").val(new Date().getFullYear() + '-01-01');
			$("#" + tabId + " #edate").val(new Date().getFullYear() + '-12-31');
			$("#" + tabId + " #sdate").datetimepicker({
				format : "yyyy-mm-dd",
				autoclose : true,
				todayBtn : true,
				minView : 2,
				language : 'zh-CN'
			});
			$("#" + tabId + " #edate").datetimepicker({
				format : "yyyy-mm-dd",
				autoclose : true,
				todayBtn : true,
				minView : 2,
				language : 'zh-CN'
			});
			
		});
		
		function importData(){
			$('#' + tabId + ' #loading').fadeIn();
			$.ajax({
				type : "post",
				url : contextPath
						+ "/MedicalRecord/importMrDataFromHIS.dhc",
				data : {
					dateFrom:$("#" + tabId + " #sdate").val(),
					dateTo:$("#" + tabId + " #edate").val()
				},
				success : function(result) {
					if (result.success) {
						
					} else {
						alert(JSON.stringify(result))
					}
					$('#' + tabId + ' #loading').fadeOut();
				}
			});
		}
	</script>
</body>
</html>